<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('Qrcode/index')}">二维码列表</a></li>
            <li><a href="{:U('Qrcode/add')}">创建二维码</a></li>
        </ul>
            <div class="pagination">{$page}</div>
            <table class="table table-hover table-bordered" style="word-break:break-all;">
                <thead>
                    <tr>
                        <th width="50">id</th>
                        <th>名称/说明</th>
                        <th width="50">二维码</th>
                        <th>关注人数/取消人数</th>
                        <th>类型/创建人</th>
                        <th>创建时间/上次扫描</th>
                        <th width="50">操作</th>
                    </tr>
                </thead>
                <foreach name="lists" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}<br>{$vo.description}</td>
						<td style="padding: 0;margin: 0;"><img src="{$vo.codeurl}"></td>
						<td>{$vo.subscribe}<br>{$vo.unsubscribe}</td>
						<td>{$type[$vo['qtype']]['name']}<if condition="!$vo['qtype']"><if condition="strtotime($vo['create_time'])+$vo['expire'] lt strtotime('now')"> <b style="color: red;">(已过期)</b></if></if><br><foreach name="users" item="user"><if condition="$vo['userid'] eq $user['id']">{$user.user_login}</if></foreach></td>
						<td>{$vo.create_time}<br>{$vo.update_time}</td>
                        <td>
	                      <a href="{:U('Qrcode/edit', array('id'=>$vo['id']))}">{:L('EDIT')}</a><br>
	                      <if condition="$vo['qtype']" >
							{:L('DELETE')}
	                      <else />
						  	<a href="{:U('Qrcode/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
	                      </if>
                        </td>
                    </tr>
                </foreach>
                <thead>
                    <tr>
                        <th width="50">id</th>
                        <th>名称/说明</th>
                        <th width="50">二维码</th>
                        <th>关注人数/取消人数</th>
                        <th>类型/创建人</th>
                        <th>创建时间/上次扫描</th>
                        <th width="50">操作</th>
                    </tr>
                </thead>
            </table>
            <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
